Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few adjustments to allow to use the server properly from the fronten… #1

Merged
merged 7 commits into from
Dec 19, 2023

Conversation

ebrehault
Copy link
Collaborator

…d app

@rboixaderg
Copy link
Contributor

Do you prefer to throw a 500 error instead of 400? In this case, I think that it is a controlled error, and then maybe it is better to use 400.

@@ -28,10 +28,6 @@ export class CreateSyncDto {
if (!connectorDefinition) {
return ['Connector definition is not defined'];
}
const sourceConnector = connectorDefinition.factory();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to create a sync object without validate the conector data?

constructor(private readonly repository: ISyncRepository) {}

async execute(id: string) {
const data = await this.repository.getSync(id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create an SyncEntity and get the sourceConector from there to get the auth data. it Is better because we will have only one responsible to manage this, the entity

@ebrehault ebrehault merged commit 289f924 into main Dec 19, 2023
1 check passed
@ebrehault ebrehault deleted the adapt-to-front branch December 19, 2023 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants